<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<p>Page content</p>

<script>
document.title = "My Title";
var elem = document.createElement("link");
elem.rel = "shortcut icon";
elem.href = "red.bmp";
document.querySelector('head').appendChild(elem);
</script>
</body>
</html>
